<?php /* Smarty version Smarty-3.1.8, created on 2017-02-21 15:03:39
         compiled from "view\admin\artEdit.html" */ ?>
<?php /*%%SmartyHeaderCode:115458a972eb8578e1-58049478%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '281e31e298d5e2cf9acf222adb9906ddb424b1b9' => 
    array (
      0 => 'view\\admin\\artEdit.html',
      1 => 1487436034,
      2 => 'file',
    ),
    '3273d963a6bc6763b6bef5e02a1c4056533c6e3b' => 
    array (
      0 => 'view\\admin\\base2.html',
      1 => 1487689392,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '115458a972eb8578e1-58049478',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_58a972eba6f428_06761306',
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_58a972eba6f428_06761306')) {function content_58a972eba6f428_06761306($_smarty_tpl) {?><!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>
            博客后台         
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="./public/admin/css/x-admin.css" media="all">
    </head>
    <body>       
        
        <div class="x-body">
            <form action="index.php?c=admin&a=artUpdate" method="post" class="layui-form layui-form-pane">
               <input type="hidden" name="id" required lay-verify="id" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['id'];?>
" 
                        autocomplete="off" class="layui-input">
                <div class="layui-form-item">
                    <label for="L_title" class="layui-form-label">
                        标题
                    </label>
                    <div class="layui-input-block">
                        <input type="text" id="L_title" name="title" required lay-verify="title" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['title'];?>
" 
                        autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_title" class="layui-form-label">
                        摘要
                    </label>
                    <div class="layui-input-block">
                        <input type="text" id="L_title" name="abstract" required lay-verify="title" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['abstract'];?>
" 
                        autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="L_title" class="layui-form-label">
                       关键字
                    </label>
                    <div class="layui-input-block">
                        <input type="text" id="L_title" name="keyword" value="<?php echo $_smarty_tpl->tpl_vars['art']->value['keyword'];?>
" required lay-verify="title"
                        autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <div class="layui-input-block">
                        <textarea id="L_content" name="content" 
                        placeholder="请输入内容" class="layui-textarea fly-editor" style="height: 260px;"><?php echo $_smarty_tpl->tpl_vars['art']->value['content'];?>
</textarea>
                    </div>
                    <label for="L_content" class="layui-form-label" style="top: -2px;">
                        描述
                    </label>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            所在类别
                        </label>
                        <div class="layui-input-block">
                            <select lay-verify="required" name="kid">
                                <option>
                                </option>
                                <option value="1" <?php if ($_smarty_tpl->tpl_vars['art']->value['kid']=='1'){?>selected<?php }?>>琐言碎语</option>
                                <option value="2" <?php if ($_smarty_tpl->tpl_vars['art']->value['kid']=='2'){?>selected<?php }?>>get新技能</option>
                                <option value="3" <?php if ($_smarty_tpl->tpl_vars['art']->value['kid']=='3'){?>selected<?php }?>>作品云集</option>  <option value="4" <?php if ($_smarty_tpl->tpl_vars['art']->value['kid']=='4'){?>selected<?php }?>>情感日记</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            所属标签
                        </label>
                        <div class="layui-input-block">
                            <select lay-verify="required" name="tid">
                                <option>
                                </option>
                                <optgroup label="技术相关">
                                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='1'){?>selected<?php }?> >PHP</option>
                                    <option value="2" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='2'){?>selected<?php }?>>HTML5</option>
                                    <option value="3" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='3'){?>selected<?php }?>>js</option>
                                </optgroup>
                                <optgroup label="生活杂谈">
                                    <option value="100" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='100'){?>selected<?php }?>></option>
                                    <option value="101" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='101'){?>selected<?php }?>>我的大学</option>
                                    <option value="102" <?php if ($_smarty_tpl->tpl_vars['art']->value['tid']=='102'){?>selected<?php }?>>生活感悟</option>
                                </optgroup>
                            </select>
                        </div>
                    </div>
                </div>
               
                <div class="layui-form-item">
                    <button class="layui-btn" lay-filter="add" lay-submit>
                        保存
                    </button>
                </div>
            </form>
        </div>

        
         <script src="./public/js/jquery-1.8.2.min.js"></script>
        <script src="./public/admin/lib/layui/layui.js" charset="utf-8"></script>
        <script src="./public/admin/js/x-admin.js"></script>
         <script src="./public/admin/js/x-layui.js"></script>
        
    
        <script>
            layui.use(['form','layer','layedit'], function(){
                $ = layui.jquery;
              var form = layui.form()
              ,layer = layui.layer
              ,layedit = layui.layedit;


                layedit.set({
                  uploadImage: {
                    url: "./upimg.json" //接口url
                    ,type: 'post' //默认post
                  }
                })
  
            //创建一个编辑器
            editIndex = layedit.build('L_content');
            
              

              //监听提交
              // form.on('submit(add)', function(data){
              //   //console.log(data.field);
              //   //发异步，把数据提交给php               
              //   $.get("index.php?c=admin&a=artUpdate",{id:2,title:234},function(d){

              //           console.log(d);
              //       //在ajax的回调函数中将结果放到表单中
              //           // if (d>0) {
              //           //     layer.alert("保存成功", {icon: 6});//,function () {
              //           //         // 获得frame索引
              //           //         //var index = parent.layer.getFrameIndex(window.name);
              //           //         //关闭当前frame
              //           //         //parent.layer.close(index);
              //           //     //});
              //           // }else{
              //           //     layer.alert("保存失败", {icon: 6});
              //           // }
                        
              //       },"json");


                
              //   return false;
              // });
              
            });
        </script>
       

        <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
        </script>
    </body>
</html><?php }} ?>